﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="asp.netWebFroms._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <div>
        <asp:TextBox ID="tb1" runat="server" Width="200px"></asp:TextBox>
        <asp:Button runat="server" ID="select" Text="查询" OnClick="select_Click"/>
        <asp:Button runat="server" ID="Add" Text="添加" OnClick="Add_Click" />
    </div>


    <asp:GridView ID="gv1" runat="server" AutoGenerateColumns="false"
        OnRowCancelingEdit="gv1_RowCancelingEdit" OnRowEditing="gv1_RowEditing" OnRowUpdating="gv1_RowUpdating" OnRowDeleting="gv1_RowDeleting">

        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="true"/>
            <asp:BoundField DataField="Title" HeaderText="标题" />
            <asp:BoundField DataField="Content" HeaderText="内容" />
            <asp:BoundField DataField="Author" HeaderText="作者" />
            <asp:BoundField DataField="Remarks" HeaderText="备注" />
            <asp:CommandField ButtonType="Button" ShowDeleteButton="true" ShowEditButton="true" ShowCancelButton="true" HeaderText="操作"/>
        </Columns>
        
    </asp:GridView>
</asp:Content>
